package com.gsit.expenditure.domain;

import javax.persistence.Column;
import javax.persistence.DiscriminatorColumn;
import javax.persistence.DiscriminatorType;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.NotEmpty;

@Entity
@Table(name = "address")
@Inheritance(strategy=InheritanceType.SINGLE_TABLE )
@DiscriminatorColumn(name="TYPE", discriminatorType=DiscriminatorType.STRING,length=20)
public class Address extends BaseEntity{

	@NotNull(message="Required")
	@NotEmpty(message="Required")
	@Column(name = "address1")
	private String address1;

	@Column(name = "address2")
	private String address2;
	
	@NotNull(message="Required")
	@NotEmpty(message="Required")
	@Column(name = "city")
	private String city;
	
	@NotNull(message="Required")
	@NotEmpty(message="Required")
	@Column(name = "state")
	private String state;
	
	@NotNull(message="Required")
	@NotEmpty(message="Required")
	@Column(name = "country")
	private String country;
	
	//@NotEmpty(message="Required")
	@Column(name = "pincode")
	private String pinCode;


	public String getAddress1() {
		return address1;
	}

	public void setAddress1(String address1) {
		this.address1 = address1;
	}

	public String getAddress2() {
		return address2;
	}

	public void setAddress2(String address2) {
		this.address2 = address2;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public String getPinCode() {
		return pinCode;
	}

	public void setPinCode(String pinCode) {
		this.pinCode = pinCode;
	}

}
